import instance from '../utils/http'
/**
 * 根据商品id查询商品详情
 */
export const reqGetCakeInfo=(cakeid)=>{
    return instance.get(`/cake/getCakeById/?cakeid=${cakeid}`);
}
// cate.js
export const reqGetCakeList = (categoryid) => {
    // 增加非空判断，避免传 undefined
    if (!categoryid) {
      return Promise.reject(new Error('categoryid 不能为空'));
    }
    return instance.get(`/cake/getCakeListByCategoryId/?categoryid=${categoryid}`);
  };